<template>
  <router-view />
</template>

<script setup>
// import useReceiveDataStore from '@/store/modules/receiveData'
// const useReceiveData = useReceiveDataStore()
// const handleIframeMessage = (event) => {
//   try {
//     const receivedData = JSON.parse(event.data)
//     useReceiveData.setReceiveData(receivedData)
//     console.log(receivedData)
//   } catch (error) {
//   }
// }
// window.addEventListener('message', handleIframeMessage)
// onUnmounted(() => {
//   window.removeEventListener('message', handleIframeMessage)
// })






const { proxy } = getCurrentInstance()
import useSettingsStore from '@/store/modules/settings'
import { handleThemeStyle } from '@/utils/theme'

onMounted(() => {
  nextTick(() => {
    // 初始化主题样式
    handleThemeStyle(useSettingsStore().theme)
  })
})
</script>
